15-112 Fundamentals of Programming

Homework 2.2


For this homework, there is no starter file. You have to create your own .py file and submit it to Autolab. You can take a previous starter file and modify it appropriately.

  • Please add your name, Andrew id, and section at the top of the file.
  • Write test functions for each function you write.
  • APPLY TOP-DOWN DESIGN, USE LOTS OF HELPER FUNCTIONS.
  • IMPORTANT: Make sure you put all test functions and manually graded functions below #ignore_rest.
  • You will be graded on style. You can lose up to 10 poins for style (out of 100 points). Please see here for the style rubric.
  • You may not use recursion, sets, dictionaries or any other constructs that we have not yet covered in class.
  • You will have 5 submissions on Autolab for this homework.
  • Questions

    1. lookAndSay(a) [20 pts]

    See question 1 from here.

    2. inverseLookAndSay(a) [15 pts]

    See question 2 from here.

    3. encrypt(plaintext, password) [25 pts]

    Write only the encrypt function described in part 6 (Simple Encryption) from here.

    4. runSimpleTortoiseProgram(program, winWidth=500, winHeight=500) [40 pts]

    See question 6 from here. Note this is manually graded. So please put the solution after the #ignore_rest line



    Valid CSS! Valid XHTML 1.0 Strict